package engine.flag
{
	import newx.com.config.StaticIni;
	
	public class GameDefine
	{
		//////////////////////////////////////////////////////////////////////////
		
		static public const SceneType_Normal				:int	= 20;         //普通场景
		static public const SceneType_CSEntry				:int	= 1;         //副本入口
		static public const SceneType_CS					:int	= 2;         //副本场景
		static public const SceneType_Compete				:int	= 5;         //竞技场
		static public const SceneType_BT					:int	= 6;         //战队竞技场
		static public const SceneType_Challenge			:int	= 9;		 //擂台场景
		static public const SceneType_ChallengeGuild 		:int	= 10;       //家族挑战场景
		static public const SceneType_FamilyRebels 		:int	= 11;       //家族造反场景
		static public const SceneType_Clone				:int	= 23;		//镜像挑战场景	
		static public const SceneType_Gut					:int	= 21;		//剧情引导场景
		static public const SceneType_Attack				:int	= 22;		//战斗场景	
		static public const SceneType_WorldBossScene 		:int    = 25;       //世界BOSS场景
		static public const SceneType_FamilyScene			:int	= 26;		//家族场景
		static public const SceneType_FactionScene		:int	= 27;		//帮派战场景
		static public const SceneType_EscortScene			:int	= 28;		//押镖
		static public const SceneType_Map					:int	= 29;		//世界地图
		static public const SceneType_Tour				:int  	= 30 ; 		//江湖游历
		static public const SceneType_FactionBossScene	:int    = 31;       //帮派BOSS场景
		static public const SceneType_ForbiddenAreaScene	:int    = 32;       //禁地探秘场景
		static public const SceneType_StrideMain			:int	= 33;		//跨服战
		static public const SceneType_SnowBallFightScene	:int	= 34;		//打雪人场景
		
		
		//用于区分副本的类型只(精英副本和普通副本的SceneType相同故用此区别)
		///////////////////////////////////////////////////////////////////////////////
		static public const SceneElite_FbScene			:int    = 1;         //区分精英副本的标示
		///////////////////////////////////////////////////////////////////////////////
		//装备栏位
		////////////////////////////////////////////////////////////////////////////
		//装备类物品的分类
		//物品类型=可装备到装备栏中的位置1,位置2,位置3
		
		/**
		 * 装备类物品的分类[EquipType]
		 *		Adorn :玉佩
		 * 		Weapon :武器
		 * 		Belt :腰带
		 * 		Hat :帽子
		 * 		Clothe :衣服
		 * 		Shoe :鞋子
		 *		Fashion :时装
		 */		
		public  static const	Adorn:int=1,
			Weapon:int=2,
			Belt:int=3,
			Hat:int=4,
			Clothe:int=5,
			Shoe:int=6,
			Fashion:int=7;
		/**
		 *转化 EQPOS_HASH_MAP[EquipType]
		 *枚举 @copy GameDefine#Adorn
		 * @see	Adorn
		 * 
		 * 
		 */		
		public static const	EQPOS_HASH_MAP:Object={Adorn:1,
			Weapon:2,
			Belt:3,
			Hat:4,
			Clothe:5,
			Shoe:6,
			Fashion:7};
		//头部
		static public const EquipType_Hat				:String	= "Hat";
		//肩部	
		static public const EquipType_Shoulder		:String	= "Shoulder";
		//胸部
		static public const EquipType_Chest			:String	= "Chest";
		//披风
		static public const EquipType_Mantle			:String	= "Mantle";
		//护腕
		static public const EquipType_Wrist			:String	= "Wrist";
		//手套
		static public const EquipType_Glove			:String	= "Glove";
		//护腿
		static public const EquipType_Legharness		:String	= "Legharness";
		//鞋子
		static public const EquipType_Shoe			:String	= "Shoe";
		//项链
		static public const EquipType_Necklace		:String	= "Necklace";
		//戒指
		static public const EquipType_Ring			:String	= "Ring";		
		//饰品
		static public const EquipType_Adorn			:String	= "Adorn";
		//武器
		static public const EquipType_Weapon			:String	= "Weapon";
		//盾牌
		static public const EquipType_Guard			:String	= "Guard";
		//腰带
		static public const EquipType_Belt			:String	= "Belt";
		//时装
		static public const EquipType_Fashion			:String	= "Fashion";
		
		//		//头部
		//		static public const EquipType_Hat				:String	= "Hat";
		//		//肩部	
		//		static public const EquipType_Shoulder		:String	= "Shoulder";
		//		//胸部
		//		static public const EquipType_Chest			:String	= "Chest";
		//		//披风
		//		static public const EquipType_Mantle			:String	= "Mantle";
		//		//护腕
		//		static public const EquipType_Wrist			:String	= "Wrist";
		//		//手套
		//		static public const EquipType_Glove			:String	= "Glove";
		//		//护腿
		//		static public const EquipType_Legharness		:String	= "Legharness";
		//		//鞋子
		//		static public const EquipType_Shoe			:String	= "Shoe";
		//		//项链
		//		static public const EquipType_Necklace		:String	= "Necklace";
		//		//戒指
		//		static public const EquipType_Ring			:String	= "Ring";		
		//		//饰品
		//		static public const EquipType_Adorn			:String	= "Adorn";
		//		//武器
		//		static public const EquipType_Weapon			:String	= "Weapon";
		//		//盾牌
		//		static public const EquipType_Guard			:String	= "Guard";
		//		//腰带
		//		static public const EquipType_Belt			:String	= "Belt";
		//		//时装
		//		static public const EquipType_Fashion			:String	= "Fashion";
		/////////////////////////////////////////////////////////////////////////////
		//物品类型
		////////////////////////////////////////////////////////////////////////////
		//属性公式
		
		/**
		 *根据sta（体魄）得到当前最大生命 
		 * @param sta
		 * @param level 根据等级来算
		 * @return 
		 * 
		 */		
		public static function GET_MAXHP(sta:int,level:int):int
		{
			return int(sta*level/2);
		}
		/**
		 *根据skill id  得到skill 描述 
		 * @param skillId
		 * @return 
		 * 
		 */		
		public static function GET_SKILL_DES(skillId:int):String
		{
			return StaticIni.getSwfLangStr("SkillDes_"+skillId);
		}
		/**
		 *根据门派得到 初始技能 
		 * @param nation
		 * @return 
		 * 
		 */		
		public static function GET_FIRST_SKILL(nation:int):String
		{
			return StaticIni.getIniVar("firstskill_"+nation,"skill");
		}
		/////////////////////门派//////////////////////////////////////////////////
		/**
		 *		NationString_001	少林
		 NationString_002	武当
		 NationString_003	明教
		 NationString_010	丐帮
		 NationString_011	雪山派
		 NationString_012	全真教
		 NationString_013	日月神教
		 NationString_014	五岳剑派
		 NationString_015	逍遥派
		 NationString_016	峨眉派
		 NationString_017	西域
		 NationString_018	天龙寺
		 NationString_019	五毒教  
		 */
		public static  function PART_GANG(index:int):String
		{
			var str:String="NationString_001";
			//			index++;
			return StaticIni.getSwfLangStr((str.substring(0,str.length-String(index).length)+index))
		}
		/**
		 *		NationString_001	少林
		 NationString_002	武当
		 NationString_003	明教
		 NationString_010	丐帮
		 NationString_011	雪山派
		 NationString_012	全真教
		 NationString_013	日月神教
		 NationString_014	五岳剑派
		 NationString_015	逍遥派
		 NationString_016	峨眉派
		 NationString_017	西域
		 NationString_018	天龙寺
		 NationString_019	五毒教  
		 */
		public static  function PART_PROFTYPE(index:int):String
		{
			var str:String="ProftypeString_001";
			//			index++;
			return StaticIni.getSwfLangStr((str.substring(0,str.length-String(index).length)+index))
		}
		
		//请求类型
		////////////////////////////////////////////////////////////////////////////
		//组队请求
		static public const REQUESTTYPE_TEAM					:Number	= 1;
		//交易请求
		static public const REQUESTTYPE_EXCHANGE				:Number	= 2;
		//邀请加入公会请求
		static public const REQUESTTYPE_GUILD					:Number	= 3;
		//加入好友请求
		static public const REQUESTTYPE_FRIEND				:Number = 4;
		//加入黑名单请求
		static public const REQUESTTYPE_BLACKLIST				:Number = 5;
		//表情动作请求
		static public const REQUESTTYPE_ACTION				:Number = 6;
		//收徒弟请求
		static public const REQUESTTYPE_INVITE_STUTDENT		:Number = 7;
		//拜师请求
		static public const REQUESTTYPE_INVITE_TEACHER		:Number = 8;
		//解除师徒关系请求
		static public const REQUESTTYPE_FREE_TEACHRELATION	:Number = 9;
		//结婚请求
		static public const REQUESTTYPE_MARRIAGE				:Number = 10;
		//离婚请求
		static public const REQUESTTYPE_DIVORCMENT			:Number = 11;
		//点击新闻后的确认
		static public const REQUESTTYPE_CLIECKNEWS			:Number = 12;
		//加入军团请求
		static public const REQUESTTYPE_CORPS					:Number = 13;
		//人气组队
		static public const REQUESTTYPE_HELPTEAM				:Number = 14;
		
		static public const REQUESTTYPE_PK					:Number = 15;
		static public const REQUESTTYPE_COUNT					:Number = 16;
		
		static public const REQUESTTYPE_JOIN_TEAM				:Number = 17;
		//邀请加入战队请求
		static public const REQUESTTYPE_JOIN_BT				:Number   = 18;
		
		//强制PK
		static public const REQUESTTYPE_FORCE_PK				:Number = 24;
		
		//领地战强制PK
		static public const REQUESTTYPE_MANOR_FORCE_PK		:Number	= 25;
		////////////////////////////////////////////////////////////////////////////
		
		//		材料: 0
		//		红药: 1
		//		蓝药: 2
		//		
		//		技能书：4
		//		生产技能卷轴:7
		//		100~200为装备
		static public const ItemType_Material     :int = 100;      
		static public const ItemType_AddHP        :int = 1;      
		static public const ItemType_AddMP        :int = 2;      
		static public const ItemType_SkillBook    :int = 4;      
		static public const ItemType_Scroll       :int = 7;  
		
		static public const ItemType_health		:int = 104; //回血回蓝
		static public const ItemType_SpecialKungfu :int = 120; 
		
		
		static public const SubItemType_AddHp		:int = 10401;//加血
		static public const SubItemType_AddMp		:int = 10402;//加蓝
		static public const SubItemType_box		:int = 10305;
		/**
		 *	装备		ItemType_EUIP:int	=	106,
		 合成书	ItemType_COMPOSE:int	=	109; 
		 *	宝石		ItemType_GEM:int	=	200;
		 * 	功法		ItemType_KUNGFU:int	=	111;
		 * 宝箱			ItemType_GOLDBOX:int=	103;
		 * 令牌		ItemType_TOKEN:int = 115;
		 * 宠物装备	ItemType_PET_EUIP		= 107;
		 */		
		static public const	ItemType_EUIP:int	=	106,
			ItemType_PET_EUIP:int   = 107,
			ItemType_COMPOSE:int	=	109,
			ItemType_GEM:int	=	200,
			ItemType_KUNGFU:int	=	111,
			ItemType_GOLDBOX:int=	103,
			ItemType_RASKRES:int= 102,
			ItemType_TOKEN:int = 115;
		
		//队伍返回信息
		////////////////////////////////////////////////////////////////////////////
		//static public const ItemType_Material     :int = 0;    
		static public const TEAM_NAME  					:int = 0;
		static public const TEAM_PHOTO					:int = 1;
		static public const TEAM_HPRATIO					:int = 2;
		static public const TEAM_CAPTAIN					:int = 3;
		static public const TEAM_FLAG						:int = 4;
		static public const TEAM_MPRATIO					:int = 5;
		static public const TEAM_BUFF						:int = 6;
		static public const TEAM_LEVEL					:int = 7;
		static public const TEAM_SCENE					:int = 8;
		static public const TEAM_PICKSERIAL				:int = 9;
		static public const TEAM_NATION					:int = 10;
		static public const TEAM_POS						:int = 11;               //站位
		static public const TEAM_PROFTYPE					:int = 12;          //职业
		static public const TEAM_MODEL					:int = 13;            //模型ID
		static public const TEAM_SCORE					:int = 14;             //积分
		static public const TEAM_ONLINE					:int = 15;			 //在线
		static public const TEAM_EMPLOY					:int = 16;			 //佣兵
		static public const TEAM_AITYPE					:int = 17;
		static public const TEAM_ISFOLLOW					:int = 18;
		static public const TEAM_MAX						:int = 19;
		
		//雇用类型信息
		
		////////////////////////////////////////////////////////////////////////////
		
		static public const AITYPE_DEFENCE				:int = 1;
		static public const AITYPE_OFFENSIVE				:int = 2;
		static public const AITYPE_INTENSIFY				:int = 3;
		static public const AITYPE_WEAKEN					:int = 4;
		static public const AITYPE_CURE					:int = 5;
		////////////////////////////////////////////////////////////////////////////
		static public const Castle_Tech					:int = 0;
		static public const Castle_Work					:int = 1;
		static public const Castle_Make					:int = 2;
		static public const Castle_Func					:int = 3;
		
		//NPC状态信息
		////////////////////////////////////////////////////////////////////////////
		static public const NPCStatus_NULL				:int = 0;           //没标识
		static public const NPCStatus_CanSubmit			:int = 1;           //可提交
		static public const NPCStatus_Fight        		:int = 2;           //可点击战斗
		static public const NPCStatus_TaskAccept			:int = 3;           //可接普通任务
		static public const NPCStatus_DTaskAccept			:int = 4;           //可接每日任务
		static public const NPCStatus_UnComplete			:int = 5;           //未完成
		static public const NPCStatus_Failed				:int = 6;           //已失败
		static public const NPCStatus_Exercise   			:int = 9;        	 //活动NPC
		static public const NPCStatus_Trade				:int = 10;          //可交易
		static public const NPCStatus_Talk				:int = 11;          //可对话
		static public const NPCStatus_Task          		:int = 12;          //任务NPC，无任务可接
		static public const NPCStatus_Adventure			:int = 13;          //奇遇	
		
		//任务分类信息
		////////////////////////////////////////////////////////////////////////////
		static public const TASKTYPE_OTHER				:int = 0;   //其它
		static public const TASKTYPE_HUNT	     			:int = 1;   //猎杀类
		static public const TASKTYPE_COLLECT	 			:int = 2;   //收集类
		static public const TASKTYPE_INTERACTIVE 			:int = 3;   //交互类
		static public const TASKTYPE_CONVOY		 		:int = 4;   //护送类
		static public const TASKTYPE_TIMELIMIT  	 		:int = 5;   //时间限制类
		static public const TASKTYPE_PUBLIC      			:int = 6;   //公共活动类
		static public const TASKTYPE_CUSTOM      			:int = 7;   //自定义类型
		static public const TASKTYPE_SPRING_ITEM 			:int = 8;   //道具触发类
		static public const TASKTYPE_SPRING_NPC  			:int = 9;   //NPC触发类
		static public const TASKTYPE_GETLORD     			:int = 10;  //城堡主获得
		static public const TASKTYPE_COMPETE     			:int = 11;  //竞技场类
		static public const TASKTYPE_GATHER_PRODUCE     	:int = 12;  //采集制造类类
		static public const TASKTYPE_VOCATION    			:int = 13;  //职业任务类
		
		//聊天
		////////////////////////////////////////////////////////////////////////////
		static public const CHATTYPE_SILENCE 		:int= 0;	//禁言
		static public const CHATTYPE_VISUALRANGE 	:int= 1;	//可视范围聊天(轻声)
		static public const CHATTYPE_WHISPER 		:int= 2;	//私聊
		static public const CHATTYPE_TEAM			:int= 3;	//组队聊天
		static public const CHATTYPE_ALLFRIEND 		:int= 4;	//好友
		static public const CHATTYPE_GUILD 			:int= 5;	//帮会聊天
		static public const CHATTYPE_UNION 			:int= 6;	//军团联盟聊天
		static public const CHATTYPE_CASTLE_MASTER	:int= 7;	//城堡主聊天
		static public const CHATTYPE_CITY 			:int= 8;	//市聊天-玩家出生的市
		static public const CHATTYPE_PROVIENCE 		:int= 9;	//省聊天-玩家出生的省
		static public const CHATTYPE_NATION 		:int= 10;	//国家频道
		static public const CHATTYPE_SCENE 			:int= 11;	//普通场景聊天（地区聊天）
		static public const CHATTYPE_WORLD 			:int= 12;	//跨服的世界聊天（喇叭）
		static public const CHATTYPE_GLOBAL 		:int= 13;	//全服务区跨服聊天(需要小喇叭道具)
		static public const CHATTYPE_GLOBAL2		:int= 14;	//全服务区跨服聊天(需要大喇叭道具)
		static public const CHATTYPE_BATTLECAMP 	:int= 15;	//战场阵营频道
		static public const CHATTYPE_TRADE 			:int= 16;	//交易频道
		static public const CHATTYPE_GM_HELP		:int= 18;//GMCC频道
		static public const CHATTYPE_CAMP			:int= 19;	//阵营聊天
		static public const CHATTYPE_TOGM			:int= 20;	 //toGM频道	
		static public const CHATTYPE_CASTLE 			:int = 17;//城堡频道
		static public const CHATTYPE_WHISPER_ECHO 	:int= 101;	//私聊回显
		static public const CHATTYPE_ALLFRIEND_ECHO	:int= 104;	//对所有好友聊天回显
		static public const CHATTYPE_WORLD_BY_MONEY	:int= 105; //扣钱的世界聊天
		static public const CHATTYPE_All				:int= 106; //全部
		static public const CHATTYPE_SYSTEM		:int= 999;	//系统消息
		
		//制造
		//		static public const Funcid_SelectIndex_Produce    :int	= 50101;  //预留6个制造技能
		//售卖
		static public const Funcid_SelectIndex_CommonTrade:int  = 50100;	//普通商店
		static public const Funcid_SelectIndex_ScrollTrade:int  = 50101;	//卷轴商店
		static public const Funcid_SelectIndex_CastleTrade:int  = 50102;	//城堡贡献商店
		
		
		static public const PriceType_GoidCoin		:int	= 0;  //金币
		static public const PriceType_BindPoint		:int	= 1;  //点数
		static public const PriceType_CompetePoint	:int	= 2;  //竞技场点数
		
		static public const ProfType_Warrior		:int	= 0;  //战士
		static public const ProfType_Mage			:int	= 1;  //法师
		static public const ProfType_Priest		:int	= 2;  //牧师
		static public const ProfType_Rouge		:int	= 3;  //盗贼
		static public const ProfType_Paladin		:int	= 4;  //圣骑
		static public const ProfType_Warlock		:int	= 5;  //术士
		static public const ProfType_Hunter		:int	= 6;  //猎人
		
		
		////////////////////////////////////////////////////////////////////////
		static public const MosterType_Null		:int	= 0;  //无
		static public const MosterType_Human		:int	= 1;  //人形
		static public const MosterType_Animal		:int	= 2;  //野兽
		static public const MosterType_Element	:int	= 3;  //元素
		static public const MosterType_Daimon		:int	= 4;  //恶魔
		static public const MosterType_Dragon		:int	= 5;  //龙
		static public const MosterType_Undead		:int	= 6;  //亡灵
		static public const MosterType_Titan		:int	= 7;  //巨人
		
		////////////////////////////////////////////////////////////////////////
		
		//邮件
		static public const Letter_Type_Common    :int		 = 0;    // 普通
		static public const Letter_Type_System    :int		= 1;    // 系统
		static public const Letter_Type_Guild     :int    	= 2;    // 公会
		static public const Letter_Type_Vote      :int    	= 3;    // 选举
		static public const Letter_Type_CastleBattle:int  	= 4;    // 攻城
		static public const Letter_Type_SysTemAuto:int	 	= 5;    // 系统自动
		static public const Letter_Type_SystemYW	:int		= 6;    // 运营邮件
		static public const Letter_Type_SystemAC	:int		= 7;    // 活动竞技场邮件
		static public const Letter_Type_Pklist	:int		= 10;    //挑战竞技场邮件
		static public const Letter_Type_ROB		:int		= 18;    //劫镖邮件
		static public const Letter_Type_CampBattle:int		= 14;    //阵营战邮件
		
		
		
		
		////////////////////////////////////////////////////////////////////////
		
		static public const  MESSAGEBOX_NONE:int = 0;							//普通提示消息，不返回服务器参数
		
		static public const  MESSAGEBOX_APPLYCASTLE_REQUIRE:int = 80;			//确认申请加入城堡
		
		static public const 	MESSAGEBOX_LEAVECASTLE_REQUIRE:int = 81;		//确认退出城堡
		
		static public const 	MESSAGEBOX_AFK_MIDSTOP:int = 82;				//确认终止挂机
		
		static public const 	MESSAGEBOX_SWITCH_SCENE_CONFIRM :int= 90;       //确认传送
		
		static public const 	MESSAGEBOX_FB_ENTRY:int = 100;					//确认人数不等也进入副本
		
		static public const 	MESSAGEBOX_FB_LEAVE:int = 101;					//确认离开副本
		
		static public const 	MESSAGEBOX_TO_WORLD:int  = 102;					//确认去大世界
		
		static public const 	MESSAGEBOX_TO_CASTLE:int = 103;					//确认去城堡
		
		static public const	MESSAGEBOX_TO_HOME:int   = 104;					//确认回家
		
		static public const	MESSAGEBOX_AREA_GET:int  = 105;					//确认提交勇者之证
		
		static public const	MESSAGEBOX_GET_TIMEGIFT:int  = 106;				//确认领取新手礼包
		
		static public const	MESSAGEBOX_USE_FBTICKET:int = 107;					//确认使用副本门票
		
		static public const	MESSAGEBOX_FB_LEAVE_TEAM:int = 108;				//确认副本中离队
		
		static public const  MESSAGEBOX_BF_JOIN_BF:int = 109;						//确认离队并加入战场
		
		static public const  MESSAGEBOX_BF_TRANSFER_BF:int = 110;           //确认传送战场
		
		static public const  MESSAGEBOX_BF_ESCAPE:int = 111;                 //确认逃离战场
		
		static public const	MESSAGE_RANDOMTASK_ACCEPTTASK :int = 120		//确认消耗金钱,体力,道具,接取随即任务
		
		static public const	MESSAGE_CONSUMETASK_ACCEPTTASK	:int= 121;		//确认承接消耗任务，显示需要消耗的物品
		
		//		static public const 	MESSAGE_TEAMMEMBER_AUTOFOLLOW	:int=122;		//队员是否自动跟随
		
		static public const MESSAGE_JOIN_TEAM_AUTOFOLLOW	:int=122;		//队员是否自动跟随
		
		static public const MESSAGE_CASTLEISSUETASK_INCTIMES:int = 123;	//增加点数
		
		static public const MESSAGE_CHALLENGE_OVERALWAYSWIN:int = 125;	//离开竞技场
		
		static public const MESSAGE_CHALLENGE_LEAVEFROMCHALLENGE:int = 126;	//离开竞技场
		
		static public const MESSAGE_GOODSBOURSE_BUY:int = 127;	// 是否购买此物品
		
		static public const MESSAGE_AUTO_SEEK_ROAD	:int	= 128;	// 是否自动寻路
		
		static public const MESSAGE_TRANSFER_SCENE    :int = 129;  //战场大厅切换到下一个场景
		
		static public const MESSAGE_QUIT_HB_QUEUE	:int = 130;// 是否退出百人战场队列
		
		static public const MESSAGEBOX_AUTO_TASK_COMPLETE:int = 131; //确认开启vip服务
		
		static public const MESSAGEBOX_CHARGE_BECOME_VIP :int = 132;  //确认扣点成为vip玩家
		
		static public const MESSAGEBOX_HB_FOLLOWCAPTAIN  :int				= 133; // 确认是否跟随队长进入百人战场
		
		public function GameDefine()
		{
		}
	}
}
